<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <style>
        label {
            margin: 10px;
            font-size: 24px;
        }

        ul {
            margin-bottom: 10px;
        }

        ul li {
            margin: 5px 10px;
            padding: 5px;
            color: #000;
            word-wrap: break-word;
        }
    </style>
</head>

<body>
    <label>Hello APP</label>
    <label>Hello 12</label>
    <div id='sys-info'></div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    apiready = function() {
        var ver = api.version;
        var sType = api.systemType;
        var sVer = api.systemVersion;
        var id = api.deviceId;
        var model = api.deviceModel;
        var name = api.deviceName;
        var cType = api.connectionType;
        var winName = api.winName;
        var winWidth = api.winWidth;
        var winHeight = api.winHeight;
        var frameName = api.frameName || '';
        var frameWidth = api.frameWidth || '';
        var frameHeight = api.frameHeight || '';

        var str = `<ul>`;
        str += `<li>引擎版本信息: ${ver} </li>`;
        str += `<li>系统类型: ${ sType }</li>`;
        str += `<li>系统版本: ${ sVer }</li>`;
        str += `<li>设备标识: ${ id }</li>`;
        str += `<li>设备型号: ${ model }</li>`;
        str += `<li>设备名称: ${ name }</li>`;
        str += `<li>网络状态: ${ cType }</li>`;
        str += `<li>主窗口名字: ${ winName }</li>`;
        str += `<li>主窗口宽度: ${ winWidth }</li>`;
        str += `<li>主窗口高度: ${ winHeight }</li>`;
        str += `<li>子窗口名字: ${ frameName }</li>`;
        str += `<li>子窗口宽度: ${ frameWidth }</li>`;
        str += `<li>子窗口高度: ${ frameHeight }</li>`;
        str += `</ul>`;

        $api.byId('sys-info').innerHTML = str;
        console.log(1)
        console.log($api);
    }
    /*
    {"version":"1.3.9",
    "systemType":"android",
    "systemVersion":"5.1",
    "deviceId":"863904038556238",
    "deviceModel":"OPPO A37m",
    "deviceName":"OPPO",
    "connectionType":"wifi",
    "wgtParam":{},
    "pageParam":{},
    "appParam":"{}",
    "wgtRootDir":"file:///android_asset/widget",
    "winName":"unit",
    "frameName":"",
    "winWidth":360,
    "winHeight":622,
    "frameWidth":360,
    "frameHeight":622,
    "appId":"wifidebug",
    "appName":"AppLoader",
    "wgtLoaderDir":"/storage/emulated/0/UZMap/wgt/",
    "appVersion":"1.3.22",
    "screenWidth":720,
    "screenHeight":1280,
    "fsDir":"/storage/emulated/0/UZMap/wifidebug",
    "cacheDir":"/storage/emulated/0/UZMap/wifidebug/cache",
    "operator":"none",
    "deviceToken":"863904038556238",
    "fingerPrint":"OPPO/A37m/A37:5.1/LMY47I/1520330081:user/release-keys",
    "statusBarAppearance":false,
    "debug":false,
    "boxDir":"/data/data/com.apicloud.apploader/box",
    "channel":"apicloud",
    "jailbreak":false,
    "uiMode":"phone",
    "safeArea":{"top":18,"left":0,"bottom":0,"right":0}}
    at unit.bundle.067731d8e203535ed9c4.js : 482
     */
</script>

</html>
